import {StrictMode} from 'react'
import reactDOM from 'react-dom'
import App from './App.jsx'
import {BrowserRouter, Route, Switch} from 'react-router-dom'
import store from './redux/count_gong_ju.js'


store.subscribe(()=>{ //监听redux数据修改，重新渲染页面
    reactDOM.render(
        <StrictMode>
            <BrowserRouter>
                {/*使用Switch防止匹配多个路由*/}
                <Switch>
                    <Route path="/" component={App}/>
                </Switch>
            </BrowserRouter>
        </StrictMode>,
        document.getElementById('root'))
})
